Repository navigation
Move [doc] extra to a PEP 735 dependency group; add uv-sync CI check - #2243
Merged
Merged
Conversation
Member
|
Thanks. |
Merged
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 25, 2026
The documentation build dependencies (Sphinx and its extensions) used to be the `doc` extra. 9e54de4 (gitpython-developers#2243) moved them to a PEP 735 `doc` dependency group in `pyproject.toml`, and CI now installs them with `pip install --group doc`, but the tox `html` environment still asked for the `doc` extra. GitPython no longer has that extra, so `tox -e html` failed before building anything: html: failed with extras not found for package GitPython: doc (available: gix, test) Install the `doc` dependency group with `dependency_groups = doc` instead. `extras =` is set to empty, so the environment still installs only GitPython and the documentation dependencies, as it did with `extras = doc`, rather than inheriting `extras = test` from `[testenv]`. `dependency_groups` was added in tox 4.22, so raise the `requires` floor from `tox>=4` to `tox>=4.22`. With an older tox installed, tox then provisions a new enough one rather than ignoring the setting. Run locally with tox 4.67.1, `tox -e html` now installs the group and builds the HTML documentation successfully. Sphinx reports one warning, about the docstring of `git.objects.submodule.util.is_relative_url`. CI's documentation build reports the same single warning. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has two related changes. The first is to move the
[doc]optional dependency to a dependency group (PEP 735). This requires pip v25.1 available for Python 3.9 or later to work; older Python versions will ignore this data. The contents ofdoc/requirements.txtis moved topyproject.toml, and.readthedocs.yamlis adjusted to use the dependency group.The second change is to resolve an incompatibility with the project dependencies identified with uv sync:
The fix is to simply to limit the version via
sphinx >=7.4.7,<8 ; python_version >= "3.9"'. This change should be fine, since versions before Python 3.9 can't install the dependency group and are not tested to build the documentation in the CI.A CI check is added to see if the dependencies can be resolved for all extras and all groups for all supported versions of Python.